package com.boot6.mapper;

import com.boot6.pojo.Dept;
import com.boot6.pojo.DeptVo01;
import org.apache.ibatis.annotations.Select;

/**
 * @author wzm
 * @create 2024-03-04 10:40
 * project_name:JavaWeb2401
 * @Description
 */
//演示一对多
public interface DeptMapper01 {
    //根据id查询部门同时查询该部门下的所有员工信息
    DeptVo01 getDeptById(Integer id);
    //方法二 分步查询
    DeptVo01 getDeptById01(Integer id);

    @Select("select * from dept where id =#{id}")
    DeptVo01 getDept(Integer id);

}
